From: Shengjing Zhu Date: Sat, 6 Mar 2021 09:56:19 +0000 (+0800) Subject: Enable test when building X-Git-Tag: archive/raspbian/1.1.9+ds1-4+rpi1^2^2~83 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=b6770d46c9c8238ebcbcfca563fefcbab500df52;p=opencc.git Enable test when building --- diff --git a/debian/control b/debian/control index 2eadce4..834dae0 100644 --- a/debian/control +++ b/debian/control @@ -13,6 +13,7 @@ Build-Depends: darts, debhelper-compat (= 13), doxygen , + googletest , libmarisa-dev, libtclap-dev, python3:any, diff --git a/debian/patches/0005-Use-system-googletest.patch b/debian/patches/0005-Use-system-googletest.patch new file mode 100644 index 0000000..783d6bb --- /dev/null +++ b/debian/patches/0005-Use-system-googletest.patch @@ -0,0 +1,22 @@ +From: Shengjing Zhu +Date: Sat, 6 Mar 2021 17:53:25 +0800 +Subject: Use system googletest + +Forwarded: not-needed +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index efb51ae..e26b934 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -195,7 +195,7 @@ add_subdirectory(test) + ######## Testing + + if (ENABLE_GTEST) +- add_subdirectory(deps/gtest-1.11.0) ++ add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) + enable_testing() + endif() + diff --git a/debian/patches/no-remote-images-when-reading-docs-on-disk.patch b/debian/patches/no-remote-images-when-reading-docs-on-disk.patch index 3ea24ee..60b1bbc 100644 --- a/debian/patches/no-remote-images-when-reading-docs-on-disk.patch +++ b/debian/patches/no-remote-images-when-reading-docs-on-disk.patch @@ -1,9 +1,17 @@ -Description: Don't fetch remote images when reading docs on disk - This fixes a privacy breach previously reported as Lintian warnings -Author: Gunnar Hjalmarsson +From: Gunnar Hjalmarsson +Date: Sat, 6 Mar 2021 17:45:20 +0800 +Subject: Don't fetch remote images when reading docs on disk + Forwarded: no Last-Update: 2021-01-14 +This fixes a privacy breach previously reported as Lintian warnings +--- + README.md | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/README.md b/README.md +index d941d6b..0663dcd 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ diff --git a/debian/patches/series b/debian/patches/series index 74933a6..35f4862 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ use-cmake-install-libdir.patch 0003-use-system-libraries.patch 0003-data-Explicitly-use-python3.patch no-remote-images-when-reading-docs-on-disk.patch +0005-Use-system-googletest.patch diff --git a/debian/rules b/debian/rules index e4cc9c4..250a007 100755 --- a/debian/rules +++ b/debian/rules @@ -25,6 +25,11 @@ else BUILD_OPTIONS += -DBUILD_DOCUMENTATION=OFF endif +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) +BUILD_OPTIONS += -DENABLE_GTEST=ON +else +BUILD_OPTIONS += -DENABLE_GTEST=OFF +endif override_dh_auto_configure: dh_auto_configure -- $(BUILD_OPTIONS)